1. Field of the Invention
This invention relates generally to maintaining computer program code and particularly to a method of reverse reading computer program code to locate useful information.
2. Description of Background
In the process of maintaining old code, a programmer often comes across a piece of code that performs a desired function, but the code is not written in a way such that the function is clearly exposed. In this case, the programmer may end up copying part of the code from the source, but it is often difficult to determine what additional lines of code the desired function depends on.
By way of example, it is assumed that a first programmer wrote code that a second programmer wanted to copy because the first programmer's code performed the same function that the second programmer needed to code. It is also assumed that the first programmer is, for example, inexperienced and/or lacks sophisticated programming skills, and simply points the second programmer to a method that contained several functions, including the function that the second programmer desires to copy. In this scenario, the second programmer would have to parse through the entire source of such code in order to determine which portion(s) thereof is relevant to the desired function so as to further identify the specific portion(s) of code to be copied.
Such a scenario is increasingly likely upon consideration that, as older programmers continue to retire, they are replaced by younger programmers who may be unable to support older code (procedural). In other words, much of the old code does not support object oriented programming, whereas any new student coming out of college is only familiar with object oriented programming. There is thus a risk that as the legacy programmers retire, new programmers will not have the appropriate skills to support this older code.
Often times when being asked to maintain foreign code, programmers may not even need to know how to use the language the old code was written in. Rather, they simply need to look at the code and update it based upon other examples in the code. However, if the code is overly complex, not object oriented, or even very well defined structurally it can be very difficult to maintain without extensive knowledge of how the programming language works. What is needed therefore is a method of reverse read code to locate useful information.